<?php

namespace App\Kuafu\Shop\Service\DouyinLibrary;

use App\Kuafu\Base\Service\BaseService;

class DouyinShopService extends DouyinBaseService
{
    /**
     * 单门店信息 查询
     *
     * @param string $poiId
     * @return mixed
     */

    public function getShopByPoiId(string $poiId)
    {
        $bizParam = [
            'page'   => 1,
            'size'   => 10,
            'poi_id' => $poiId
        ];
        $response = $this->doCurl('/goodlife/v1/shop/poi/query/', $bizParam);

        $format = self::commonReturn($response);

        return $format['oriData'];

    }

    /**
     * 门店列表 查询
     *
     * @param string $accountId
     * @param int $page
     * @param int $size
     * @return mixed
     */

    public function getShopList(string $accountId, int $page = 1, int $size = 10)
    {
        $bizParam = [
            'page'       => $page,
            'size'       => $size,
            'account_id' => $accountId
        ];
        $response = $this->doCurl('/goodlife/v1/shop/poi/query/', $bizParam);

        $format = self::commonReturn($response);
        return $format['oriData'];
    }

}